
import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from "typeorm";
import { Exclude } from 'class-transformer';

@Entity()
export class Users {
   @PrimaryGeneratedColumn()
   id: number;

   @Column({ length: 20 })
   username: string;

   @Column({ length: 20 })
   @Exclude()
   password: string;

   @CreateDateColumn()
   createdAt: Date = new Date();

   @UpdateDateColumn()
   updatedAt: Date = new Date();
}